The present invention relates generally to the field of electronic data processing systems, and more particularly, to windowing user interfaces.
Modem computer systems typically provide a windows based user interface. Examples of such systems include MacOS(trademark) from Apple Computer Systems, Solaris (trademark) from Sun Microsystems, and variants of the Microsoft Windows(trademark) operating system, such as Windows 95(trademark), Windows 98(trademark), and Windows NT(trademark), all available from Microsoft Corporation. These windowing systems typically provide applications the ability to create windows to display output data and to respond to input data when the window is active or when a cursor is positioned over the window. The output data is displayed when the application paints images, draws figures, or writes text to the window. Applications using windows can direct output to the windows under their control rather than directly to the display screen itself. This prevents output data from one application from interfering with the output data of another application.
In the past, the shape of a window has been limited to a rectangular window. However, recently windowing systems have added the capability for windows to be non-rectangular. That is, windows can now be in the shape of an ellipse, a circle, or a polygon with an arbitrary number of sides. One manner in which non-rectangular windows are created is by defining a non-rectangular region on the display, and then setting the region to be a window. For example, in the Microsoft Windows system, an elliptical, polygon, rectangular or round region is created using the CreateEllipticalRgn, CreatePolygonRgn, CreateRectRgn or CreateRoundRgn functions. The region is then set to a window using the SetWindowRgn function.
While the ability to create non-rectangular windows is an improvement, there are some restrictions accompanying the use of non-rectangular windows. One such restriction is that the title bar associated with such a window is left-justified. That is, the title bar appears beginning at the leftmost side of the non-rectangular region defining the window. No option is provided that allows the title bar to be centered or right justified.
Previous systems have attempted to solve this problem by taking over control of painting the title bar. That is, the system provides custom title bar painting code rather than letting the windowing system paint the title bar.
This approach, while providing for options in positioning the title bar, presents two significant problems. First, if the general appearance of title bars changes, as is common when new versions of windowing systems are released, the custom code provided in previous systems must be changed in order for the title bar to reflect the new appearance. This increases the maintenance cost associated with previous systems.
Second, the custom painting code typically does not address associated menu display operations. Thus, the main menu for the application that is invoked from the title bar will still be left justified, leading to situation that is potentially confusing to the application user.
For the reasons stated above, and for other reasons stated below which will become apparent to those skilled in the art upon reading and understanding the present specification, there is a need in the art for a way to provide a title bar for non-rectangular windows that provides for placement options other than left-justification.
In one embodiment of the invention, a method includes displaying a plurality of windows, such as a first window and a second window. The method receives messages from an operating system, where the messages have message types. The method then passes the message to at least one of the windows, according to the message type.